function [ weights ] = matrixes_from_vector( individual )
% MATRIXES_FROM_VECTOR 
%   Esta funcion devuelve las matrices de pesos de un individuo a partir de
%   su forma en vector

global LAYERS;
global INPUTS;

i = 0;
weights = cell(1,length(LAYERS));
input = INPUTS + 1;

for counter = 1:length(LAYERS)
    j = input * LAYERS(counter) + i;
    weights{counter} = reshape(individual(i+1:j), LAYERS(counter), input);
    input = LAYERS(counter)+1;
    i = j;
end

end

